{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Logistic Regression With Non-Linear Boundary Demo\n",
    "\n",
    "_Source: 🤖[Homemade Machine Learning](https://github.com/trekhleb/homemade-machine-learning) repository_\n",
    "\n",
    "> ☝Before moving on with this demo you might want to take a look at:\n",
    "> - 📗[Math behind the Logistic Regression](https://github.com/trekhleb/homemade-machine-learning/tree/master/homemade/logistic_regression)\n",
    "> - ⚙️[Logistic Regression Source Code](https://github.com/trekhleb/homemade-machine-learning/blob/master/homemade/logistic_regression/logistic_regression.py)\n",
    "\n",
    "**Logistic regression** is the appropriate regression analysis to conduct when the dependent variable is dichotomous (binary). Like all regression analyses, the logistic regression is a predictive analysis. Logistic regression is used to describe data and to explain the relationship between one dependent binary variable and one or more nominal, ordinal, interval or ratio-level independent variables.\n",
    "\n",
    "Logistic Regression is used when the dependent variable (target) is categorical.\n",
    "\n",
    "For example:\n",
    "\n",
    "- To predict whether an email is spam (`1`) or (`0`).\n",
    "- Whether online transaction is fraudulent (`1`) or not (`0`).\n",
    "- Whether the tumor is malignant (`1`) or not (`0`).\n",
    "\n",
    "> **Demo Project:** In this example we will try to classify microchips into to categories (`valid` and `invalid`) based on two artifical parameters `param_1` and `param_2`."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "# To make debugging of logistic_regression module easier we enable imported modules autoreloading feature.\n",
    "# By doing this you may change the code of logistic_regression library and all these changes will be available here.\n",
    "%load_ext autoreload\n",
    "%autoreload 2\n",
    "\n",
    "# Add project root folder to module loading paths.\n",
    "import sys\n",
    "sys.path.append('../..')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Import Dependencies\n",
    "\n",
    "- [pandas](https://pandas.pydata.org/) - library that we will use for loading and displaying the data in a table\n",
    "- [numpy](http://www.numpy.org/) - library that we will use for linear algebra operations\n",
    "- [matplotlib](https://matplotlib.org/) - library that we will use for plotting the data\n",
    "- [logistic_regression](https://github.com/trekhleb/homemade-machine-learning/blob/master/homemade/logistic_regression/logistic_regression.py) - custom implementation of logistic regression"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Import 3rd party dependencies.\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "# Import custom logistic regression implementation.\n",
    "from homemade.logistic_regression import LogisticRegression"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Load the Data\n",
    "\n",
    "In this demo we will use artificial dataset in which `param_1` and `param_2` produce non-linear decision boundary (see the plot below)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>param_1</th>\n",
       "      <th>param_2</th>\n",
       "      <th>validity</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.051267</td>\n",
       "      <td>0.699560</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>-0.092742</td>\n",
       "      <td>0.684940</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>-0.213710</td>\n",
       "      <td>0.692250</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>-0.375000</td>\n",
       "      <td>0.502190</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>-0.513250</td>\n",
       "      <td>0.465640</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>-0.524770</td>\n",
       "      <td>0.209800</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>-0.398040</td>\n",
       "      <td>0.034357</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>-0.305880</td>\n",
       "      <td>-0.192250</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>0.016705</td>\n",
       "      <td>-0.404240</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>0.131910</td>\n",
       "      <td>-0.513890</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    param_1   param_2  validity\n",
       "0  0.051267  0.699560         1\n",
       "1 -0.092742  0.684940         1\n",
       "2 -0.213710  0.692250         1\n",
       "3 -0.375000  0.502190         1\n",
       "4 -0.513250  0.465640         1\n",
       "5 -0.524770  0.209800         1\n",
       "6 -0.398040  0.034357         1\n",
       "7 -0.305880 -0.192250         1\n",
       "8  0.016705 -0.404240         1\n",
       "9  0.131910 -0.513890         1"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Load the data.\n",
    "data = pd.read_csv('../../data/microchips-tests.csv')\n",
    "\n",
    "# Print the data table.\n",
    "data.head(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Plot the Data\n",
    "\n",
    "Let's plot the data on 2D-plane and split it by two clasess (`valid` and `invalid`) to see the distribution."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAEXCAYAAABlI9noAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvDW2N/gAAIABJREFUeJzt3Xu8XGV97/HPl2vCQUkIiGTvhISSIkhSoluUxnoBNIgKOZbGxFqDQqMtXl56ioRDD1KsL6K2ckrxUg5S8MZFqhCrgEBAK4qwU8LVxgQisjcgmBiqEkKA3/ljrSErk5m95/KstZ4183u/Xvs1M2utmXlm7b3nt57b75GZ4ZxzzoWwU9kFcM451zs8qDjnnAvGg4pzzrlgPKg455wLxoOKc865YDyoOOecC8aDiusrkr4k6f8U/J4m6aAm+/5c0veLLI9zeZLPU3G9QNIvgKnAVDP7dWb7ncDhwEwz+0VJZTNglpmtK+C9/gS4tvYQ2AP4feaQQ83slx287gRgMzDNzEa6LqjrWV5Tcb1kPbC49kDSbJIv1a4oUYn/FTP7DzPb08z2BF6ebp5U29ZJQHGuHZX4R3GuRV8F3pN5vAT4SvYASZdI+vvM4xMkrZb035IekHRsuv0WSZ+SdCvwFHCgpKmSVkjaKGmdpL/MvM7Okv53+hq/lbRK0rTMWx8jaa2kTZI+L0np806S9KPM65ikD0t6UNKvJX22FtAkHSTpB5KeTPdd0clJkrS3pK9IekzSw5I+kXmPl0n6UfoeT0iqnb8fprdrJP1O0gJJL5V0XfqZNkha2Ul5XG/ZpewCOBfQbcBfSDoE+DmwCJgH/H2jgyUdQRJ0TgRuAvYHXpQ55C+AtwBrSJqSbgLuJWlmexlwg6QHzGwl8DGSWtJx6XvPIQlGNW8DXgW8GFgFfAe4rsnn+J/AELAncGP6/hcBnwS+D7wR2C09phNfB9YBBwJ7Ad8DfgFcC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p0gL4taQ92bZUQCN7sW0djyVjHOdcpXhQca5za4BTJf2MZO2NL5LUTu4lWcfijjGeezbwTUmrgF+HKIykD0saIWlau1vSRSFe17l2eOp75zqQjv7697RD3jmX8pqKc865YLym4lzFSPo2yVyWrNPNrPilY52r40HFOedcMN785ZxzLhgPKs4554LxoOKccy4YDyrOOeeC+f9Ho3FwBQkg2wAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Supported set of validities.\n",
    "validities = [0, 1]\n",
    "\n",
    "# Dataset parameters that we will take into account.\n",
    "x_axis = 'param_1'\n",
    "y_axis = 'param_2'\n",
    "\n",
    "# Scatter the data on the plot for each validity class separatelly.\n",
    "for validity in validities:\n",
    "    plt.scatter(\n",
    "        data[x_axis][data['validity'] == validity],\n",
    "        data[y_axis][data['validity'] == validity],\n",
    "        label=validity\n",
    "    )\n",
    "\n",
    "# Plot the data.    \n",
    "plt.xlabel(x_axis)\n",
    "plt.ylabel(y_axis)\n",
    "plt.title('Microchips Tests')\n",
    "plt.legend()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Prepare the Data for Training\n",
    "\n",
    "Before we move on with training our logistic model let's extract the data from Pandas data frame and shape training features set and labels set correctly."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Get the number of training examples.\n",
    "num_examples = data.shape[0]\n",
    "\n",
    "# Extract and shape features.\n",
    "x_train = data[[x_axis, y_axis]].values.reshape((num_examples, 2))\n",
    "\n",
    "# Extract and shape labels.\n",
    "y_train = data['validity'].values.reshape((num_examples, 1))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Init and Train Logistic Regression Model\n",
    "\n",
    "> ☝🏻This is the place where you might want to play with model configuration.\n",
    "\n",
    "- `polynomial_degree` - this parameter will allow you to add additional polynomial features of certain degree. More features - more curved the line will be.\n",
    "- `max_iterations` - this is the maximum number of iterations that gradient descent algorithm will use to find the minimum of a cost function. Low numbers may prevent gradient descent from reaching the minimum. High numbers will make the algorithm work longer without improving its accuracy.\n",
    "- `regularization_param` - parameter that will fight overfitting. The higher the parameter, the simplier is the model will be.\n",
    "- `polynomial_degree` - the degree of additional polynomial features (`x1^2 * x2, x1^2 * x2^2, ...`). This will allow you to curve the predictions.\n",
    "- `sinusoid_degree` - the degree of sinusoid parameter multipliers of additional features (`sin(x), sin(2*x), ...`). This will allow you to curve the predictions by adding sinusoidal component to the prediction curve."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Theta 0</th>\n",
       "      <th>Theta 1</th>\n",
       "      <th>Theta 2</th>\n",
       "      <th>Theta 3</th>\n",
       "      <th>Theta 4</th>\n",
       "      <th>Theta 5</th>\n",
       "      <th>Theta 6</th>\n",
       "      <th>Theta 7</th>\n",
       "      <th>Theta 8</th>\n",
       "      <th>Theta 9</th>\n",
       "      <th>...</th>\n",
       "      <th>Theta 13</th>\n",
       "      <th>Theta 14</th>\n",
       "      <th>Theta 15</th>\n",
       "      <th>Theta 16</th>\n",
       "      <th>Theta 17</th>\n",
       "      <th>Theta 18</th>\n",
       "      <th>Theta 19</th>\n",
       "      <th>Theta 20</th>\n",
       "      <th>Theta 21</th>\n",
       "      <th>Theta 22</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>VALID</th>\n",
       "      <td>-2.024052</td>\n",
       "      <td>1.660125</td>\n",
       "      <td>-1.042190</td>\n",
       "      <td>1.660125</td>\n",
       "      <td>-1.042190</td>\n",
       "      <td>-3.345081</td>\n",
       "      <td>11.635574</td>\n",
       "      <td>-10.209539</td>\n",
       "      <td>-19.784433</td>\n",
       "      <td>-29.263600</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.443705</td>\n",
       "      <td>37.384232</td>\n",
       "      <td>1.548052</td>\n",
       "      <td>40.476004</td>\n",
       "      <td>16.795521</td>\n",
       "      <td>24.197483</td>\n",
       "      <td>-0.966907</td>\n",
       "      <td>33.948141</td>\n",
       "      <td>46.700557</td>\n",
       "      <td>-22.072182</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>INVALID</th>\n",
       "      <td>2.028452</td>\n",
       "      <td>-1.614655</td>\n",
       "      <td>1.083132</td>\n",
       "      <td>-1.614655</td>\n",
       "      <td>1.083132</td>\n",
       "      <td>3.439305</td>\n",
       "      <td>-11.411377</td>\n",
       "      <td>10.258364</td>\n",
       "      <td>19.310634</td>\n",
       "      <td>28.477962</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.423851</td>\n",
       "      <td>-38.205306</td>\n",
       "      <td>-2.021708</td>\n",
       "      <td>-40.536997</td>\n",
       "      <td>-16.190337</td>\n",
       "      <td>-22.698874</td>\n",
       "      <td>2.868809</td>\n",
       "      <td>-32.068645</td>\n",
       "      <td>-45.901514</td>\n",
       "      <td>22.308492</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>2 rows × 23 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          Theta 0   Theta 1   Theta 2   Theta 3   Theta 4   Theta 5  \\\n",
       "VALID   -2.024052  1.660125 -1.042190  1.660125 -1.042190 -3.345081   \n",
       "INVALID  2.028452 -1.614655  1.083132 -1.614655  1.083132  3.439305   \n",
       "\n",
       "           Theta 6    Theta 7    Theta 8    Theta 9    ...      Theta 13  \\\n",
       "VALID    11.635574 -10.209539 -19.784433 -29.263600    ...     -0.443705   \n",
       "INVALID -11.411377  10.258364  19.310634  28.477962    ...     -0.423851   \n",
       "\n",
       "          Theta 14  Theta 15   Theta 16   Theta 17   Theta 18  Theta 19  \\\n",
       "VALID    37.384232  1.548052  40.476004  16.795521  24.197483 -0.966907   \n",
       "INVALID -38.205306 -2.021708 -40.536997 -16.190337 -22.698874  2.868809   \n",
       "\n",
       "          Theta 20   Theta 21   Theta 22  \n",
       "VALID    33.948141  46.700557 -22.072182  \n",
       "INVALID -32.068645 -45.901514  22.308492  \n",
       "\n",
       "[2 rows x 23 columns]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Set up linear regression parameters.\n",
    "max_iterations = 100000  # Max number of gradient descent iterations.\n",
    "regularization_param = 0  # Helps to fight model overfitting.\n",
    "polynomial_degree = 5  # The degree of additional polynomial features.\n",
    "sinusoid_degree = 0  # The degree of sinusoid parameter multipliers of additional features.\n",
    "\n",
    "# Init logistic regression instance.\n",
    "logistic_regression = LogisticRegression(x_train, y_train, polynomial_degree, sinusoid_degree)\n",
    "\n",
    "# Train logistic regression.\n",
    "(thetas, costs) = logistic_regression.train(regularization_param, max_iterations)\n",
    "\n",
    "# Rename the columns for each theta.\n",
    "columns = []\n",
    "for theta_index in range(0, thetas.shape[1]):\n",
    "    columns.append('Theta ' + str(theta_index));\n",
    "\n",
    "pd.DataFrame(thetas, index=['VALID', 'INVALID'], columns=columns)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Analyze Gradient Descent Progress\n",
    "\n",
    "The plot below illustrates how the cost function value changes over each iteration. You should see it decreasing. \n",
    "\n",
    "In case if cost function value increases it may mean that gradient descent missed the cost function minimum and with each step it goes further away from it.\n",
    "\n",
    "From this plot you may also get an understanding of how many iterations you need to get an optimal value of the cost function."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEKCAYAAADjDHn2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvDW2N/gAAIABJREFUeJzt3XuYXXV97/H3Z88lkxuBhAFDJjEBAnIVZEhFK7WWS6SaYKEa7EVqNccK1dbWU3L0wYqnLdaWo0fziBRoPR4kcpDqSFEKeL8AmQiCCQZCADMplxBIgJC5f88f67eTnc2evSfJrNk7yef1PPvJXr91+87Mznzmt37roojAzMysmkK9CzAzs8bnsDAzs5ocFmZmVpPDwszManJYmJlZTQ4LMzOryWFhZmY1OSzMzKwmh4WZmdXUXO8Cxsqhhx4ac+fOrXcZZmb7lFWrVj0bEe21lttvwmLu3Ll0d3fXuwwzs32KpCdGs5wPQ5mZWU0OCzMzq8lhYWZmNe03YxZmZvUyMDBAT08Pvb299S5lRG1tbXR0dNDS0rJH6zsszMz2Uk9PD1OnTmXu3LlIqnc5rxARbN68mZ6eHubNm7dH2/BhKDOzvdTb28uMGTMaMigAJDFjxoy96vk4LMzMxkCjBkXR3tZ3wIfFthe3cPe1H+Hhn3+/3qWYmTWsAz4s+rZv4/U91/H8I3fXuxQzsz32ne98h2OPPZajjz6aK6+8csy3n2tYSFooaa2kdZIuG2GZd0paI2m1pK+WtA9Juj+9uvKqsVBoAiCGh/LahZlZroaGhrjkkkv49re/zZo1a7jxxhtZs2bNmO4jt7OhJDUBy4GzgR5gpaSuiFhTssx8YBnwxoh4XtJhJZvYHhGn5FXfjhqa0rcghvPelZlZLu69916OPvpojjzySACWLFnCN7/5TY4//vgx20eep84uANZFxHoASSuAxUBp3L0fWB4RzwNExDM51lNRoZA6Vw4LMxsDn/zWatb81wtjus3jjzi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1QoPt9jrrLnRNyg7FkRN0ualOZdqewZJQ9I+qcx+27bAWGP/qoya3AnkN3CvJrXASdHxHOpd/GOiHhB0qHA3ZK60jJLyHoCzWmbu9wwMN1D6/PA4ojYlH75/x3w3rRIc0QsSIedPhERZ0m6nOyq30sr1HU92Z1iLyS7evjLEfEI2c32TozsRopIOgeYT3a/JwFdym4U+GuyUPvTiPiJpOuBD0r6V+AdwGsiIoq3TjEbLYeF7fckLSe7hUl/RJyemu+IiOeKiwB/n37ZDpPd6vlw4E3Av0fEy2k7le4bdixwInBHdvSLJrJbuBQVb8K4iuzZJVVFxP2SjiS7l9NZwEpJZwDbyxY9J73uS9NTyMLj18CGiPhJav+/wIfIbqPeC1yn7Gl+t9aqxayUw8L2R6uBC4oTEXFJ6jF0lyyzreT9HwDtwGkRMaDsDrJto9yXgNURccYI8/vSv0OM8v9bRLxEFjK3SBomG9/4eoX9/kNEfGmXxuz5I+X38ImIGJS0gOxmdBcCl5IdrjMbFY9Z2P7ou0CbpD8raZtUZflpZM+kGJD022SP1AT4IXC+pInpDq5vr7DuWqA9/fWPpBZJJ9So70Wyx9W+gqQ3aueznlvJHmf7RIV1bgfeq+yZI0iaJemwNG9OsR7g3cCP03LTIuI24C+B19ao0WwXDgvb70R2d8zzgd+S9Jike8me+/w3I6xyA9Ap6UHgj8nu8klE/Bz4GtmdW79Ndkv78n31k/2l/mlJvyC7Q+8bapT4PeD4EQa4jwJ+kGq5j6w39PWI2Az8JJ1O+5mI+E+yZ37/LC17MzvDZC3Zw44eIruj6xfTvFslPQD8mOyZ4Waj5rvOmu1H0mGoW9Npt2Zjxj0LMzOryT0LMzOryT0LMzOryWFhZmY1OSzMzKwmh4WZmdXksDAzs5ocFmZmVtP/B6FjZao5R5HDAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Draw gradient descent progress for each label.\n",
    "labels = logistic_regression.unique_labels\n",
    "\n",
    "plt.plot(range(len(costs[0])), costs[0], label=labels[0])\n",
    "plt.plot(range(len(costs[1])), costs[1], label=labels[1])\n",
    "\n",
    "plt.xlabel('Gradient Steps')\n",
    "plt.ylabel('Cost')\n",
    "plt.legend()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Calculate Model Training Precision\n",
    "\n",
    "Calculate how many flowers from the training set have been guessed correctly. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Training Precision: 88.9831%\n"
     ]
    }
   ],
   "source": [
    "# Make training set predictions.\n",
    "y_train_predictions = logistic_regression.predict(x_train)\n",
    "\n",
    "# Check what percentage of them are actually correct.\n",
    "precision = np.sum(y_train_predictions == y_train) / y_train.shape[0] * 100\n",
    "\n",
    "print('Training Precision: {:5.4f}%'.format(precision))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Draw Decision Boundaries\n",
    "\n",
    "Let's build our decision boundaries. These are the lines that distinguish classes from each other. This will give us a pretty clear overview of how successfull our training process was. You should see clear distinguishment of three sectors on the data plain. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAEXCAYAAABlI9noAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvDW2N/gAAIABJREFUeJzsnXd8k9X6wL9Pkk666GC1hQIFBAEBEUXEhQo4ABeCCnrFPa96Vfzde53XK+5xcYOKW1yICxyIuFBA9t7QsspoobtNzu+PpFBK2ma8Sd6k5/v59JPkfc97zpM0eZ9znnVEKYVGo9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3gEWFvIcBi3LHiiOAzYVtyyJiVx52YB9SiwhSP09HVXEgZmVxS8Vs8Jo7zgvgRtLQxhOBX5E6nWz4T2H+Z6RWzUTg4qZ0OwEijRezK3Z30PcOvhC0LudKxWzwjpD0yTz/NdItLYCXJR3I7qECWjmI3eN4zOojndkexZWK2eBtAC6V9Axp7I1fkFon60jjWDzWR96rgbslPQ68XEYwki6T9CLp1tpaSbeUsV+zgXDX92aDkN/++kN+IG9mmVsqZmZWGrdUzPYwkpaQfstSdGVE1D90rFkTVypmZlYa3/4yM7PSuFIxM7PSuFIxM7PSuFIxM7PS/B9i51ohhpgAGwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Get the number of training examples.\n",
    "num_examples = x_train.shape[0]\n",
    "\n",
    "# Set up how many calculations we want to do along every axis. \n",
    "samples = 150\n",
    "\n",
    "# Generate test ranges for x and y axis.\n",
    "x_min = np.min(x_train[:, 0])\n",
    "x_max = np.max(x_train[:, 0])\n",
    "\n",
    "y_min = np.min(x_train[:, 1])\n",
    "y_max = np.max(x_train[:, 1])\n",
    "\n",
    "X = np.linspace(x_min, x_max, samples)\n",
    "Y = np.linspace(y_min, y_max, samples)\n",
    "Z = np.zeros((samples, samples))\n",
    "\n",
    "# z axis will contain our predictions. So let's get predictions for every pair of x and y.\n",
    "for x_index, x in enumerate(X):\n",
    "    for y_index, y in enumerate(Y):\n",
    "        data = np.array([[x, y]])\n",
    "        Z[x_index][y_index] = logistic_regression.predict(data)[0][0]\n",
    "\n",
    "# Now, when we have x, y and z axes being setup and calculated we may print decision boundaries.\n",
    "positives = (y_train == 1).flatten()\n",
    "negatives = (y_train == 0).flatten()\n",
    "\n",
    "plt.scatter(x_train[negatives, 0], x_train[negatives, 1], label='0')\n",
    "plt.scatter(x_train[positives, 0], x_train[positives, 1], label='1')\n",
    "\n",
    "plt.contour(X, Y, Z)\n",
    "\n",
    "plt.xlabel('param_1')\n",
    "plt.ylabel('param_2')\n",
    "plt.title('Microchips Tests')\n",
    "plt.legend()\n",
    "\n",
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
